package com.violet.controller.app;

import com.violet.domain.result.Result;
import com.violet.domain.vo.app.ACategoryVo;
import com.violet.service.app.ACategoryService;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/app/category")
@RequiredArgsConstructor
public class ACategoryController {

    private final ACategoryService service;

    @GetMapping
    public Result<List<ACategoryVo>> getAll() {
        return Result.success(service.getAll(), "获取成功");
    }

}
